#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/hash_policy.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
#define ps putchar(' ')
#define pe putchar('\n')
#define int long long
#define eb emplace_back
#define pi pair<int, int>
#define mk make_pair
#define fi first
#define se second
#define Ad tr[p].ad
// #define Ad t[p].ad
#define ls p << 1
#define rs p << 1 | 1
// #define ls tr[p].son[0]
// #define rs tr[p].son[1]
// #define ls t[p].son[0]
// #define rs t[p].son[1]
#define len (r - l + 1)
#define mid ((l + r) >> 1)
using namespace std;
// using namespace __gnu_pbds;
inline int read()
{
    int f = 0, ans = 0;
    char c = getchar();
    while (!isdigit(c))
        f |= c == '-', c = getchar();
    while (isdigit(c))
        ans = (ans << 3) + (ans << 1) + c - 48, c = getchar();
    return f ? -ans : ans;
}
void write(int x)
{
    if (x < 0)
        putchar('-'), x = -x;
    if (x > 9)
        write(x / 10);
    putchar(x % 10 + '0');
}
const int N = 2e5 + 5, M = N << 2, inf = 1e18, mod = 998244353;
int n, a[N], h[N];
int ans, id[N];
signed main()
{
    freopen("xinyue.in", "r", stdin);
    freopen("xinyue.out", "w", stdout);
    n = read(), a[0] = read();
    for (int i = 1; i <= n; ++i)
        a[i] = read(), h[i] = read();
    iota(id, id + n + 1, 0);
    auto solve = []()
    {
        int a0 = a[0], res = 0;
        for (int i = 1; i <= n; ++i)
            res += ((h[id[i]] + a0 - 1) / a0 - 1) * a[id[i]], a0 = max(a0, a[id[i]]);
        return res;
    };
    ans = inf;
    do
        ans = min(ans, solve());
    while (next_permutation(id + 1, id + n + 1));
    write(ans);
    return 0;
}
